package com.platform.modules.chat.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.platform.common.enums.GenderEnum;
import com.platform.modules.chat.domain.ChatMsgTemplate;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

@Data
@Accessors(chain = true) // 链式调用
public class MyVo09 {

    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    /**
     * 昵称
     */
    private String nickName;
    /**
     * 头像
     */
    private String portrait;
    /**
     * 封面
     */
    private String cover;
    /**
     * 性别1男0女
     */
    private GenderEnum gender;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 推送id
     */
    private String cid;
    /**
     * 小助手号
     */
    private String chatNo;
    /**
     * 介绍
     */
    private String intro;
    /**
     * 省份
     */
    private String provinces;
    /**
     * 城市
     */
    private String city;

    private String inviteQr;
    private String urlCode;
    private Integer initnum;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private String startDateStr;
    private String endDateStr;
    private List<ChatMsgTemplate> msgList;

    public String getGenderLabel() {
        if (gender == null) {
            return null;
        }
        return gender.getInfo();
    }

}
